<template>
    <div class="photoinfo-container">
        <h3 class="title">标题</h3>
        <p class="subtitle">
            <span>发表时间</span>
            <span>点击次数</span>
        </p>

        <hr>

        <!-- 缩略图区域 -->
        <vue-preview :slides="slide1" @close="handleClose"></vue-preview>
        <!-- 图片内容区 -->
        <div class="content">
            加点东西加点文字！加点东西加点文字！加点东西加点文字！加点东西加点文字！加点东西加点文字！加点东西加点文字！
        </div>

        <!-- 评论子组件 -->
        <comment-box></comment-box>
    </div>
</template>
<script>
import comment from '../subcomponents/comment.vue'
export default {
    data(){
        return {
            id:this.$route.params.id,
            // 缩略图数组
            slide1: [
                {
                    src: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=500234536,4228146269&fm=27&gp=0.jpg',
                    msrc: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=500234536,4228146269&fm=27&gp=0.jpg',
                    alt: 'picture1',
                    title: 'Image Caption 1',
                    w: 600,
                    h: 400
                },
                {
                    src: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2408678233,1307177314&fm=27&gp=0.jpg',
                    msrc: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2408678233,1307177314&fm=27&gp=0.jpg',
                    alt: 'picture2',
                    title: 'Image Caption 2',
                    w: 600,
                    h: 400
                },
                {
                    src: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2408678233,1307177314&fm=27&gp=0.jpg',
                    msrc: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2408678233,1307177314&fm=27&gp=0.jpg',
                    alt: 'picture2',
                    title: 'Image Caption 2',
                    w: 600,
                    h: 400
                },
                {
                    src: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2408678233,1307177314&fm=27&gp=0.jpg',
                    msrc: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2408678233,1307177314&fm=27&gp=0.jpg',
                    alt: 'picture2',
                    title: 'Image Caption 2',
                    w: 600,
                    h: 400
                }
            ]
        }
    },
    created(){
        this.getPhotoInfo();
    },
    methods:{
        getPhotoInfo(){
            console.log(this.id);
        },
        handleClose () {
            console.log('close event')
        }
    },
    components:{// 用来注册子组件
        'comment-box':comment
    }
}
</script>
<style lang="scss">

.photoinfo-container{
    padding: 3px;
    .subtitle{
        font-size: 12px;
        color: royalblue;
        display: flex;
        justify-content: space-between;
    }
    .title{
        color: #26a1ff;
        font-size: 15px;
        text-align: center;
        margin: 15px 0;
    }
    .content{
        font-size: 13px;
        margin-bottom: 10px;
    }
    .my-gallery{
        text-align: center;
        background-color: #eeeeee;
        figure{
            margin: 0;
            padding: 0;
            display: inline-block;
            img{
                width: 100px;
                height: 80px;
                margin-right: 10px;
                margin-top: 10px;
                border: 1px solid gray;
                border-radius: 5%;
                box-shadow: 0 0 10px gray;
            }
        }
    }
}
</style>


